﻿namespace Community.CsharpSqlite.Entity
{
    /*
    ** A structure used to customize the behavior of sqlite3Select(). See
    ** comments above sqlite3Select() for details.
    */
    //typedef struct SelectDest SelectDest;
    public class SelectDest
    {
        public char affinity; /* Affinity used when eDest==SelectResultType.SRT_Set */
        public byte eDest; /* How to dispose of the results */
        public int iMem; /* Base register where results are written */
        public int iParm; /* A parameter used by the eDest disposal method */
        public int nMem; /* Number of registers allocated */

        public SelectDest()
        {
            eDest = 0;
            affinity = '\0';
            iParm = 0;
            iMem = 0;
            nMem = 0;
        }

        public SelectDest(byte eDest, char affinity, int iParm)
        {
            this.eDest = eDest;
            this.affinity = affinity;
            this.iParm = iParm;
            iMem = 0;
            nMem = 0;
        }

        public SelectDest(byte eDest, char affinity, int iParm, int iMem, int nMem)
        {
            this.eDest = eDest;
            this.affinity = affinity;
            this.iParm = iParm;
            this.iMem = iMem;
            this.nMem = nMem;
        }
    };
}